#ifndef ENTITY_H_INCLUDED
#define ENTITY_H_INCLUDED

#include <string>
#include <vector>
#include <list>

#include "StatusEffect.h"
#include "textdisplay.h"
//#include "action.h"
#include "enums.h"


class BattleAction;

using namespace std;


class Entity
{
public:
    Entity(string name);

    void NewTurn();

    void SetRandomStats();

    string GetStatString();

    string GetName();

    bool IsPlayer();
    void SetIsPlayer(bool newIsPlayer);

    int GetHealth();
    void SetHealth(int newHealth);

    int GetMaxHealth();
    void SetMaxHealth(int newHealth);

    int GetMagic();
    void SetMagic(int newMagic);

    int GetMaxMagic();
    void SetMaxMagic(int newMaxMagic);

    int GetAttackStrength();
    void SetAttackStrength(int newStat);

    int GetDefenseStrength();
    void SetDefenseStrength(int newStat);

    int GetLuck();
    void SetLuck(int newStat);

    int GetDexterity();
    void SetDexterity(int newStat);

    void SetStatus(StatusEffectType type, int duration, int magnitude);
    void ListStatusEffects();

    void Display();

    ActionType getAction();
    void ExecuteAction(ActionType thisTurnAction, Entity *actionSubject, Entity *actionObject);

    void DisplayLastAction();

private:
    string name;
    int health;
    int maxHealth;
    bool isPlayer;
    int magic;
    int maxMagic;
    int attackStrength;
    int defenseStrength;
    int luck;
    int dexterity;

    list<StatusEffect *> statusEffectList;

//    void UpdateStatusEffects();
//    void ExecuteStatusEffects();
    bool EntityHasStatusEffect(StatusEffectType type);

    void UpdateMagic();

    TextBarMeter healthBar;
    TextBarMeter magicBar;

    BattleAction *lastAction;
};




#endif // ENTITY_H_INCLUDED
